package durak.client.view;

import java.awt.Color;
import java.awt.EventQueue;
import java.awt.Font;

import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextPane;
import javax.swing.SwingConstants;
import javax.swing.border.EmptyBorder;

public class About extends JFrame {

	private JPanel contentPane;
	private JLabel createdBy;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					About frame = new About();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public About() {
		setTitle("About Durak");
		setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
		setBounds(100, 100, 450, 300);
		contentPane = new JPanel();
		contentPane.setForeground(Color.YELLOW);
		contentPane.setBackground(new Color(102, 204, 51));
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(null);
		
		JTextPane txtpnDurakIsA = new JTextPane();
		txtpnDurakIsA.setBackground(new Color(102, 204, 51));
		txtpnDurakIsA.setForeground(new Color(25, 25, 112));
		txtpnDurakIsA.setFont(new Font("Calibri", Font.BOLD, 14));
		txtpnDurakIsA.setBounds(40, 52, 325, 127);
		txtpnDurakIsA.setText("Durak is a card game that is popular throughout most of the post-Soviet states. The object of the game is to get rid of all one's cards. At the end of the game, the last player with cards in their hand is referred to as the fool (durak).");
		txtpnDurakIsA.setEditable(false);
		contentPane.add(txtpnDurakIsA);
		
		createdBy = new JLabel();
		createdBy.setHorizontalAlignment(SwingConstants.CENTER);
		createdBy.setBackground(new Color(192, 192, 192));
		createdBy.setText("Created By Miri Liberman and Alex Braver");
		createdBy.setBounds(74, 242, 242, 20);
		contentPane.add(createdBy);
	}
}
